Skip to content

Enhancement/169/improve large img error message #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 14, 2020

Conversation

svettwer
Copy link
Contributor

@svettwer svettwer commented Sep 9, 2020

closes #169

Copy link
Member

@s1hofmann s1hofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean implementation with just one little remark 👍

const bestMatch = matches.pop();
if (bestMatch) {
if(bestMatch.error) {
throw new Error(bestMatch.error.message)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just re-throw bestMatch.error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 Great finding!
This is because I started with the previous implementation (without Error wrapper) and just added the error wrapper wherever it was required. I'll fix that, thx!

@svettwer svettwer requested a review from s1hofmann September 14, 2020 11:03
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

96.7% 96.7% Coverage
0.0% 0.0% Duplication

@svettwer svettwer merged commit 5a82e71 into develop Sep 14, 2020
@svettwer svettwer deleted the enhancement/169/improve-large-img-error-message branch September 14, 2020 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imprecise error message if image is too large
2 participants